package com.besall.allbase.view.activity.chipstoollevel4.protocol.DevelopParams;
import android.os.AsyncTask;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public abstract class CustomAsyncTask<Params, Progress, Result> extends AsyncTask<Params, Progress, Result> {
    private static final ExecutorService executorService = Executors.newFixedThreadPool(4);

    @Override
    protected final Result doInBackground(Params... params) {
        return doInBackgroundTask(params);
    }

    protected abstract Result doInBackgroundTask(Params... params);

    @Override
    protected void onProgressUpdate(Progress... values) {
        super.onProgressUpdate(values);
    }

    public void executeTask(Params... params) {
        super.executeOnExecutor(executorService, params);
    }

}